use std::env::var;
use std::thread;
use std::time::Duration;

fn main() {
    test(12)
}

fn test_closures(input: u32) -> u32 {
    thread::sleep(Duration::from_secs(2));
    input
}

fn test(value: u32) {
    let action = || -> u32 {
        thread::sleep(Duration::from_secs(2));
        value
    };

    let mut out: u32;
    if value > 10 {
        out = action()
    } else {
        out = action()
    }
    println!("value is {out}")
}
